package com.zmn.oms.task.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;

/**
 * 类描述: 保险单数据源配置
 *
 * @author liuying
 * @date 2019/01/22 8:02 PM
 */
@Configuration
public class InsDataSourceConfig {

    /*@Value("${spring.datasource.oms.ins.type:com.alibaba.druid.pool.DruidDataSource}")
    private Class<? extends DataSource> insDataSourceType;*/

    /*@Bean(name = "insDataSource")
    @ConfigurationProperties(prefix = "spring.datasource.oms.ins")
    public DataSource insDataSource() {
        return DataSourceBuilder.create().build();
    }*/

    /*@Bean(name = "insJdbcTemplate")
    public JdbcTemplate insJdbcTemplate(@Qualifier("insDataSource") DataSource insDataSource) {
        return new JdbcTemplate(insDataSource);
    }*/
}
